using Framework.FSMLite;
using Framework.Timer;
using Framework.UI;
using View;

namespace GameSystem
{
    public class StateWin: StateMachine<GameEnum>
    {
        internal override void OnEnter(params object[] args)
        {
            GameManager.Instance.ChangeVCam(5 , GameManager.Instance.GameRoom.GameRoomData.Level);
            if ((bool)args[0])
            {
                UIManager.Instance.OpenView(UIPanel.ContinuePanel);
            }
            else
            {
                UIManager.Instance.OpenView(UIPanel.EndPanel);
            }
        }

        internal override void OnExit()
        {
            UIManager.Instance.CloseView(UIPanel.EndPanel);
            UIManager.Instance.CloseView(UIPanel.ContinuePanel);
        }

    }
}